package com.example.Controller;


import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;


@Controller
@RequestMapping("/thymeleaf")
public class ThymeleafController {

    /**
     * thymeleaf 入门案例
     * @param model
     * @return
     */
    @RequestMapping("/hello")
    public String sayHello(Model model){
        System.out.println("hello");
        model.addAttribute("helloMessage","Hello, welcome to use Thymeleaf 哈哈哈!!!");
        return "HelloThymeleaf";
    }

    @RequestMapping("/fileDemo")
    public String fileDemo(){
        return "fileDemo";
    }

}
